﻿@{
    ViewBag.Title = "";
    var id = Model != null ? Model.ProvinceID : 0;
}
@using ZBJF.Warranty.BLL
@using ZBJF.Warranty.WebProvider
@model ZBJF.Warranty.Model.D_Province
<ul class="nav nav-tabs">
    <li><a href="/D_Province/">省份列表</a></li>
    <li class="active"><a href="/D_Province/Edit/@id">@(id > 0 ? "编辑省份" : "添加省份")</a></li>
</ul>
@using (Html.BeginForm("SaveProvince", "D_Province", FormMethod.Post, new { id = "mvcForm", name = "mvcForm", @class = "form-horizontal", enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(c => c.ProvinceID)
    <div class="control-group">
        <label class="control-label">省份名称:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.ProvinceName, new {validate = "{required:true,messages:{required:'请输入省份名称'}}"})
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">排序:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.Sort, new { validate = "{required:true,messages:{required:'请输入排序序号'}}"})
        </div>
    </div>
    <div class="control-group">
        <label class="control-label"></label>
        <div class="controls">
            <label>
                @Html.CheckBoxFor(m => m.IsAvailable)
                是否可用
            </label>
        </div>
    </div>
    <div class="form-actions">
        <input id="btnSubmit" class="btn btn-primary Edit-R" type="submit" value="提交">
        <input id="btnCancel" class="btn" type="button" value="返回" onclick="history.go(-1)">
    </div>
}
